﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="AnyOffice.general.system.user_priv.index" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>角色管理</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		
		<script>
function delete_priv(priv_id)
{
 msg="确认要删除该角色么？";
 if(window.confirm(msg))
 {
  URL="delete.aspx?priv_id="+priv_id;
  window.location=URL;
 }
}
		</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/notify_new.gif" align="absMiddle"><span class="big3"> 
							新建角色</span><br>
					</td>
				</tr>
			</table>
			<div align="center">
				<input type="button" value="新建角色" class="BigButton" onClick="location='new.aspx';" title="新建角色">
			</div>
			<br>
			<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
				<tr>
					<td background="/images/dian1.gif" width="100%"></td>
				</tr>
			</table>
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/notify_open.gif" align="absMiddle"><span class="big3">
							管理角色</span>
					</td>
				</tr>
			</table>
			<br>					
			<asp:Repeater id="Repeater1" runat="server" EnableViewState="False">
			<HeaderTemplate>
			<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center">				
				<TR class="TableHeader">
					<td nowrap align="center">角色排序号</td>
					<td nowrap align="center">角色名称</td>
					<td nowrap align="center">操作</td>
				</TR>						
			</HeaderTemplate>
				<ItemTemplate>
					<tr class="TableLine1">
						<td nowrap align="center"><%#Eval("PrivNo")%></td>
						<td nowrap align="center"><%#Eval("PrivName")%></td>
						<td nowrap>&nbsp;
						<a href="edit.aspx?priv_id=<%#Eval("PrivId")%>">编辑角色</a>&nbsp;&nbsp;
						<a href="edit_priv.aspx?priv_id=<%#Eval("PrivId")%>">编辑权限</a>&nbsp;&nbsp;
						<a href="clone.aspx?priv_id=<%#Eval("PrivId")%>">克隆</a>&nbsp;&nbsp;
						<%# (Convert.ToInt32(Eval("PrivId")) != AdministratorPrivId) ? "<a href=\"javascript:delete_priv('" + Eval("PrivId").ToString() + "')\">删除</a>" : ""%>
						</td>
					</tr>
				</ItemTemplate>
				<AlternatingItemTemplate>
					<tr class="TableLine2">
						<td nowrap align="center"><%#Eval("PrivNo")%></td>
						<td nowrap align="center"><%#Eval("PrivName")%></td>
						<td nowrap>&nbsp;
						<a href="edit.aspx?priv_id=<%#Eval("PrivId")%>">编辑角色</a>&nbsp;&nbsp;
						<a href="edit_priv.aspx?priv_id=<%#Eval("PrivId")%>">编辑权限</a>&nbsp;&nbsp;
						<a href="clone.aspx?priv_id=<%#Eval("PrivId")%>">克隆</a>&nbsp;&nbsp;
						<%# (Convert.ToInt32(Eval("PrivId")) != AdministratorPrivId) ? "<a href=\"javascript:delete_priv('" + Eval("PrivId").ToString() + "')\">删除</a>" : ""%>
						</td>
					</tr>
				</AlternatingItemTemplate>
				<FooterTemplate>
				</table>
				</FooterTemplate>
			</asp:Repeater>
			
			 <asp:Panel ID="pnlHelp" runat="server">
			 <br>
            <span class="small" style="cursor:hand;" title="点击打开操作提示与技巧窗口" onclick="javascript:window.open('/module/help/sys_user_priv.aspx','iask','top=0,left=0,width=600,height=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes')">&nbsp;<img src="/images/iask.gif" align="absmiddle"></span>
            </asp:Panel>
			
		</form>
	</body>
</HTML>
